package cn.project.controller;

import cn.project.biz.Userbiz;
import cn.project.model.User;
import com.opensymphony.xwork2.ActionSupport;

public class UserAction extends ActionSupport{

    private String username;
    private String password;
    private Userbiz userbiz;

    /*注册*/
    public String execute() throws Exception {
        User user=new User();
        user.setUsername(username);
        user.setPassword(password);
        userbiz.addUser(user);
        return SUCCESS;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Userbiz getUserbiz() {
        return userbiz;
    }

    public void setUserbiz(Userbiz userbiz) {
        this.userbiz = userbiz;
    }
}
